home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
datlnk.zip
/
DATEOBJ.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1993-01-04
|
1KB
|
64 lines
{$I DMINUS.INC}
{$O+} {so we can overlay this unit if we decide to}
UNIT DateObj;
{Linked list holds dates in ascending order.}
INTERFACE {section}
USES
TpDate,
Objects;
TYPE
DateObjectPtr = ^DateObject;
DateObject
= OBJECT(Node)
TheDate : Date;
CONSTRUCTOR Init(NewDate : Date);
FUNCTION GetDate : Date;
FUNCTION SelfPtr : DateObjectPtr
END;
IMPLEMENTATION {section}
{============================================================================}
CONSTRUCTOR DateObject.Init(NewDate : Date);
{Initialize the DateObject.}
BEGIN {DateObject.Init}
TheDate := NewDate;
END; {DateObject.Init}
{============================================================================}
{============================================================================}
FUNCTION DateObject.GetDate : Date;
{Return the Date from the object.}
BEGIN {GetDate}
GetDate := TheDate
END; {GetDate}
{============================================================================}
{============================================================================}
FUNCTION DateObject.SelfPtr : DateObjectPtr;
{Returns a pointer to this object.}
BEGIN {SelfPtr}
SelfPtr := @Self
END; {SelfPtr}
{============================================================================}
END. {DateObj}